package com.mengwen.backstage.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author LiangYonghui
 * @date 2020/4/21 15:32
 * @description  pc端用户数据访问层
 */
@Mapper
@Repository
public interface PcUserMapper {

   String findImgurlByUnionid(String unionid);

    String findNicknameByUnionid(String unionid);

    @Select("SELECT open_id FROM tbl_users_openid WHERE tbl_users_openid.`uid` = ((SELECT id FROM person WHERE union_id = #{unionid})) AND app_type = 0")
    String findOpenidByUnionid(String unionid);

}
